package com.example.demo.controller;

import com.example.demo.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {

    @Autowired
   private SysUserService sysUserService;

    @GetMapping("/hello")
    public String hello(){
        return "hello spring";
    }

    @GetMapping("/list")
    public Object list(){
        return sysUserService.list(null);
    }

    @GetMapping("/count")
    public Object count(){
        return sysUserService.count();
    }
}
